#include <stdio.h> 
#include <unistd.h>
#include <fcntl.h>
#include "log.h"
int main(int argc, char const *argv[])
{
    close(STDOUT_FILENO); //1 
    close(STDERR_FILENO);  //2

    open("./gateway.log",O_CREAT|O_RDWR|O_APPEND,0666);//1
    open("./gateway.err",O_CREAT|O_RDWR|O_APPEND,0666) ;//2

    printf(" print hello world\n");
    perror(" perror : hello world\n");
    log_info(" log_info : hello world\n");
    log_error(" log_error : hello world\n");

    return 0;
}
